package com.cnsoft.persistent.player.U102020Collect;

import java.util.ArrayList;
import java.util.HashMap;

import org.cnsoft.framework.apidoc.MyApiDocSupport;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 会员收藏表接口
 */
@CrossOrigin
@RestController
@RequestMapping(value = "/doc/1.0/base/u102020collect", method = { RequestMethod.GET })
public class U102020CollectApiDoc extends MyApiDocSupport {

	// 获得API地址
	public String loadApiDocName() throws Exception {
		return "会员收藏表;/doc/1.0/base/u102020collect/all";
	}

	// API文档描述
	@RequestMapping(value = "/all", method = RequestMethod.GET)
	public HashMap<String, Object> loadApiDocValue() throws Exception {
		HashMap<String, Object> all = new HashMap<String, Object>();
		// 输出基本信息
		all.put("name", "会员收藏表");
		all.put("baseurl", "/api/1.0/base/u102020collect");
		// 输出API列表
		{
			ArrayList<Object> list = new ArrayList<Object>();
			list.add("/list");
			list.add("/info");
			list.add("/append");
			list.add("/modify");
			list.add("/discard");
			all.put("apilist", list);
		}
		// 输出字段信息
		{
			ArrayList<Object> list = new ArrayList<Object>();
			HashMap<String, Object> item;
			{
				item = new HashMap<String, Object>();
				item.put("enname", "userId");
				item.put("cnname", "会员ID");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "nickName");
				item.put("cnname", "昵称");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "sex");
				item.put("cnname", "性别");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "userPhone");
				item.put("cnname", "手机号码");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "typeCode");
				item.put("cnname", "数据分类编码（1广告2文章4活动5任务6投票7问卷A商品B外卖C优惠券）");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "typeName");
				item.put("cnname", "数据分类说明");
				item.put("datatype", "String");
				item.put("memo", "1广告2文章4活动5任务6投票7问卷A商品B外卖C优惠券");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "itemId");
				item.put("cnname", "数据ID");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "itemTitle");
				item.put("cnname", "数据标题");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			{
				item = new HashMap<String, Object>();
				item.put("enname", "itemPicUrl");
				item.put("cnname", "数据封面图片");
				item.put("datatype", "String");
				item.put("memo", "");

				list.add(item);
			}
			all.put("itemlist", list);
		}

		return all;
	}

}
